package com.lj.infoisland.util;

import com.lj.infoisland.domain.vo.UserInfoVO;

public class UserContext {
    private static final ThreadLocal<UserInfoVO> userThreadLocal = new ThreadLocal<>();

    public static void setUser(UserInfoVO user) {
        userThreadLocal.set(user);
    }

    public static UserInfoVO getUser() {
        return userThreadLocal.get();
    }

    public static void removeUser() {
        userThreadLocal.remove();
    }
}